Skip to content

[TASK] Guard against infinite loop in parseList - #1427

Merged
oliverklee merged 1 commit into
mainfrom
task/guard-infinite-loop
Dec 14, 2025
Merged

[TASK] Guard against infinite loop in parseList#1427
oliverklee merged 1 commit into
mainfrom
task/guard-infinite-loop

Conversation

@JakeQZ

@JakeQZ JakeQZ commented Dec 14, 2025

Copy link
Copy Markdown
Collaborator

This can't be tested because there are currently no cases that would fail the test without the change.

It is there as a preventative double-lock measure to make sure any future code changes do not introduce an infinite loop.

It's a slight unoptimization,
as it adds what should be a redundant runtime check, but at miniscule performance cost versus the value of preventing a waste of CPU power and memory in the case that something goes wrong.

@JakeQZ
JakeQZ requested a review from oliverklee December 14, 2025 00:26
@JakeQZ JakeQZ self-assigned this Dec 14, 2025
@JakeQZ
JakeQZ marked this pull request as draft December 14, 2025 00:35
This can't be tested because there are currently no cases that would fail the
test without the change.

It is there as a preventative double-lock measure to make sure any future code
changes do not introduce an infinite loop.

It's a slight unoptimization,
as it adds what should be a redundant runtime check,
but at miniscule performance cost versus the value of preventing a waste of CPU
power and memory in the case that something goes wrong.
@JakeQZ
JakeQZ force-pushed the task/guard-infinite-loop branch from 6e845af to 6f70c5a Compare December 14, 2025 18:50
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 69.027% (-0.06%) from 69.082%
when pulling 6f70c5a on task/guard-infinite-loop
into f129f4c on main.

@JakeQZ JakeQZ added the developer-specific Issues that only affect maintainers, contributors, and people submitting PRs label Dec 14, 2025
@JakeQZ
JakeQZ marked this pull request as ready for review December 14, 2025 18:54
@JakeQZ

JakeQZ commented Dec 14, 2025

Copy link
Copy Markdown
Collaborator Author

Longer term it would probably be good to refactor the logic in parseList. This is a sticking-plaster for now.

@oliverklee
oliverklee merged commit 704c17f into main Dec 14, 2025
23 checks passed
@oliverklee
oliverklee deleted the task/guard-infinite-loop branch December 14, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup developer-specific Issues that only affect maintainers, contributors, and people submitting PRs enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants